package cn.fxw.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.fxw.pojo.User;
import cn.fxw.service.IUserService;

@Controller
public class UserController {
	@Autowired
	private IUserService userService;
	
	@RequestMapping("/user/{userId}")
	@ResponseBody
	public User getUserById(@PathVariable int userId){
		User user =userService.getUserById(userId);
		return user;
	}
	
}
